const axios = require('axios')
let _baseUrl = '/gateway/business/api'

// 查询团队用户的算力使用情况
export function getTeamUserCalculationRecentUsage (query) {
  const url = _baseUrl + '/team/getTeamUserCalculationRecentUsage' + query
  return axios.get(url).then((res) => {
    return Promise.resolve(res.data)
  })
}

// 查询团队近期算力使用情况
export function getTeamCalculationRecentUsage (query) {
  const url = _baseUrl + '/team/getTeamCalculationRecentUsage' + query
  return axios.get(url).then((res) => {
    return Promise.resolve(res.data)
  })
}

// 获取团队使用算力和剩余算力
export function getTeamCalculation (data) {
  const url = _baseUrl + '/team/getTeamCalculation'
  return axios.post(url, data).then((res) => {
    return Promise.resolve(res.data)
  })
}

// 获取团队列表带算力
export function getTeamListWithPower () {
  const url = _baseUrl + '/team/getTeamListWithPower'
  return axios.post(url).then((res) => {
    return Promise.resolve(res.data)
  })
}

// 用户算力使用状态
export function updatePowerstatus (data) {
  const url = _baseUrl + '/team/updatePowerstatus'
  return axios.post(url, data).then((res) => {
    return Promise.resolve(res.data)
  })
}
